/**
 * 
 */
package com.photoinfo.app.service;

import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * Service to read/write the Serializable PhotoInfoApp Object from the giving filename 
 * 
 * @author robh
 */
public interface SerializationService {
	
	/**
	 * writes the Object into the given file, if not exists the Stream will create a new File with the filename
	 * 
	 * @param path - String path and filename
	 * @param object - Object to save
	 * @throws FileNotFoundException 
	 * @throws IOException
	 */
	public void serialize(String path, Object object) throws FileNotFoundException, IOException;
	
	
	/**
	 * reads a object out a given filepath
	 * 
	 * @param path  - String path and filename
	 * @return Object what was extracted out of the given file
	 * @throws FileNotFoundException
	 * @throws IOException
	 * @throws ClassNotFoundException
	 */
	public Object deSerialize(String path) throws FileNotFoundException, IOException, ClassNotFoundException;
	
}
